<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
    class Eyeworx_PatientRecords_Eyes_RBO_RBOEyes extends RBO_Recordset {

        public function fields() {
            $fields = array();

            $patient = new RBO_Field_Select('Patient', 'eyeworx_patient', array('patient_full_name'));
            $patient->set_filter()->set_visible()->set_required();
            $fields[] = $patient;

            $date = new RBO_Field_Date('Date');
            $date->set_filter()->set_visible()->set_required();
            $fields[] = $date;

            // RIGHT EYE
            $r_sphere = new RBO_Field_Text('OD Sphere');
            $r_sphere->set_length(10)->set_visible();
            $fields[] = $r_sphere;

            $r_cyl = new RBO_Field_Text('OD Cylinder');
            $r_cyl->set_length(10)->set_visible();
            $fields[] = $r_cyl;

            $r_axis = new RBO_Field_Text('OD Axis');
            $r_axis->set_length(10)->set_visible();
            $fields[] = $r_axis;

            $r_add = new RBO_Field_Text('OD Add');
            $r_add->set_length(10)->set_visible();
            $fields[] = $r_add;

            // LEFT EYE
            $l_sphere = new RBO_Field_Text('OS Sphere');
            $l_sphere->set_length(10)->set_visible();
            $fields[] = $l_sphere;

            $l_cyl = new RBO_Field_Text('OS Cylinder');
            $l_cyl->set_length(10)->set_visible();
            $fields[] = $l_cyl;

            $l_axis = new RBO_Field_Text('OS Axis');
            $l_axis->set_length(10)->set_visible();
            $fields[] = $l_axis;

            $l_add = new RBO_Field_Text('OS Add');
            $l_add->set_length(10)->set_visible();
            $fields[] = $l_add;

            $pd = new RBO_Field_Text('PD');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            $pd = new RBO_Field_Text('Lens Type');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            $pd = new RBO_Field_Text('Index Eyes');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            $pd = new RBO_Field_Text('Others');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            $pd = new RBO_Field_Text('OD or MD');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            $pd = new RBO_Field_Text('License Number');
            $pd->set_length(10)->set_visible();
            $fields[] = $pd;

            return $fields;
        }

        public function table_name() {
            return 'eyeworx_eyes';
        }

    }

?>